
package com.kweative.lingua.server.structures;

import com.kweative.type.Node;
import java.util.LinkedList;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author henrik
 */
public class Arguments implements Cloneable {
    private LinkedList<Node> args = new LinkedList<Node>();
    public Node get(int index) {
        return args.get(index);
    }
    public void add(Node arg) {
        args.addLast(arg);
    }
    public boolean has(int index) {
        return size() > index;
    }
    public int size() {
        return args.size();
    }

    @Override
    public Arguments clone() {
        try {
            return (Arguments) super.clone();
        } catch (CloneNotSupportedException ex) {
            Logger.getLogger(Arguments.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }

}
